//
//  CJSStroy.m
//  GoTraveling
//
//  Created by 陈金山 on 15/12/25.
//  Copyright © 2015年 开发华佗. All rights reserved.
//

#import "CJSStroy.h"

@implementation CJSStroy

- (instancetype)init
{
    self = [super init];
    if (self) {
        self.users = [[User alloc] init];
        self.detailArray = [NSMutableArray array];
    }
    return self;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
    if ([key isEqualToString:@"detail_list"]) {
        
        for (NSDictionary *dic in value) {
            CJSDetail_list *detail_list = [[CJSDetail_list alloc] init];
            [detail_list setValuesForKeysWithDictionary:dic];
            [self.detailArray addObject:detail_list];
        }
    }
}

@end
